#ifndef _GOOSE_H_
#define _GOOSE_H_
#include "Server.h"
#include "Util.h"
#include "goose_subscriber.h"
#include "static_model.h"

#include <goose_publisher.h>
#include <goose_receiver.h>
#include <iec61850_dynamic_model.h>
#include <iec61850_model.h>
#include <linked_list.h>
#include <string>
#include <thread>
#include <unordered_map>
#include <vector>

class Goose {
  public:
    Goose(std::string interface);
    virtual ~Goose();


    void Config();

    //  订阅接受数据
    void Subscribe();

    void Observer();

  private:
    static void GooseListener(GooseSubscriber subscriber, void *parameter);

    static void ParseMmsValueFromGoose(MmsValue *value);

  public:
    std::unordered_map<GoosePublisher, LinkedList> pubMaps;

  private:
    std::string     interface;
    CommParameters  gooseCommParameters;
    GooseReceiver   receiver;
    GooseSubscriber subscriber;
};

#endif // !_GOOSE_H_
